clear			all
set 			more off
cd 				"~/Dropbox/Indonesia Migration/" // Specify your root directory here
use				"Data/Dependent variables", clear
replace			year = 1975 if year == 1976
merge 1:1 		geolev2 year using "Data/Instrumental variable"
drop 			_merge

foreach 		var in per_ict_5Y per_immig_cst_5Y av_high_educ_ct ///
				prop_male_ct per_mig_ict_lag_5Y pred_total_immig_cst_5Y_5Y ///
				pred_per_immig_cst_5Y_5Y per_mig_ict_lag2_5Y ///
				pred_total_immig_cst_10Y_5Y pred_per_immig_cst_10Y_5Y ///
				per_immig_cst_5Y_lag pred_per_immig_cst_Jaeger_10Y{
replace			`var' = `var'*100				
}
save			"Data/Merged", replace


use				"Data/Dependent variables province level", clear
replace			year = 1975 if year == 1976
merge 1:1 		geolev1 year using "Data/Instrumental variable province level"
drop 			_merge

foreach 		var in per_ict_5Y per_immig_cst_5Y av_high_educ_ct ///
				prop_male_ct per_mig_ict_lag_5Y pred_total_immig_cst_5Y_5Y ///
				pred_per_immig_cst_5Y_5Y per_mig_ict_lag2_5Y ///
				pred_total_immig_cst_10Y_5Y pred_per_immig_cst_10Y_5Y ///
				per_immig_cst_5Y_lag pred_per_immig_cst_Jaeger_10Y{
replace			`var' = `var'*100				
}
save			"Data/Merged province level", replace
